import { defineStore } from 'pinia'

interface stateType {
  count: number
}
export default defineStore('count', {
  state: (): stateType => {
    return {
      count: 1
    }
  },
  actions: {
    increase() {
      this.count++
    },
    increaseN(value: number) {
      this.count += value
    },
    increaseNWait(value: number) {
      setTimeout(() => {
        this.count += value
      }, 1000)
    }
  },
  getters: {

  }
})